<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_id')}}：</td>
						<td>
							{{form.id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_uid')}}：</td>
						<td>
							{{form.uid}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_order')}}：</td>
						<td>
							{{form.order}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_number')}}：</td>
						<td>
							{{form.number}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_balance')}}：</td>
						<td>
							{{form.balance}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_fee')}}：</td>
						<td>
							{{form.fee}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Recharge_status')}}：</td>
						<td>
							<span v-if="form.status == '0'">等待审核</span>
							<span v-if="form.status == '1'">充值成功</span>
							<span v-if="form.status == '2'">已驳回</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_type')}}：</td>
						<td>
							{{form.type}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_pay_type')}}：</td>
						<td>
							{{form.pay_type}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Recharge_create_time')}}：</td>
						<td>
							{{parseTime(form.create_time)}}
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.Recharge_sure_time')}}：</td>
						<td>
							{{parseTime(form.sure_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_coupon')}}：</td>
						<td>
							{{form.coupon}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_coupon_amount')}}：</td>
						<td>
							{{form.coupon_amount}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_from_amount')}}：</td>
						<td>
							{{form.from_amount}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Recharge_currency')}}：</td>
						<td>
							{{form.currency}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_exchange')}}：</td>
						<td>
							{{form.exchange}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_md5info')}}：</td>
						<td>
							{{form.md5info}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_remark')}}：</td>
						<td>
							{{form.remark}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_agent')}}：</td>
						<td>
							{{form.agent}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_staff')}}：</td>
						<td>
							{{form.staff}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_mother')}}：</td>
						<td>
							{{form.mother}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_from_address')}}：</td>
						<td>
							{{form.from_address}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Recharge_to_address')}}：</td>
						<td>
							{{form.to_address}}
						</td>
				 </tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail , getFieldList } from '@/api/app/recharge'
export default {
	name:'rechargedetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
			currencys:[],
		}
	},
	watch:{
		show(val){
			if(val){
				getFieldList().then(res => {
					if(res.status == 200){
						this.currencys = res.data.currencys
					}
				})
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
